package org.agile2soft.nexoma.core.controller.impl;

import java.util.List;

import org.agile2soft.nexoma.core.controller.ServiceController;
import org.agile2soft.nexoma.core.dao.ServiceDAO;
import org.agile2soft.nexoma.core.entity.Service;
import org.agile2soft.nexoma.core.entity.ServicesGroup;

import br.com.arsmachina.controller.impl.SpringControllerImpl;

public class ServiceControllerImpl
       extends SpringControllerImpl<Service, Integer>
       implements ServiceController {

    private ServiceDAO serviceDAO;

    public ServiceControllerImpl(ServiceDAO serviceDAO) {
        super(serviceDAO);
        this.serviceDAO = serviceDAO;
    }

    public List<Service> findByGroup(Integer id) {
        return serviceDAO.findByGroup(id);
    }

    public List<Service> findByGroup(ServicesGroup group) {
        return serviceDAO.findByGroup(group);
    }

}
